<?php
defined('IN_TS') or die('Access Denied.');
/* 
 * 秀店话题内容页
 */
$talkid = intval($_GET['talkid']);
if($talkid == 0){
	header("Location: ".SITE_URL);
}

$new['talk']->isTopic($talkid);

$strTopic = $new['talk']->getOneTopic($talkid);

	
	
	//宝贝标签
	$strTopic['content'] = editor2html($strTopic['content'],$talkid);
	$strTopic['user']	= aac('user')->getUserForApp($strTopic['userid']);
	$strTopic['user']['signed'] = hview($strTopic['user']['signed']);
	$title = $strTopic['title'];
	
	/**获取评论列表*/
	$page =1;
	$arrTopicComment = $new['talk']->getGroupContentComment($page,15,$talkid);
	
	$talkContentCommentNum = $new['talk']->getGroupContentCommentNum('talkid',$talkid);

	$pageUrl = pagination($talkContentCommentNum, 15, $page, $url);
	
	//最分享子
	$dangqianuser['user'] =aac('user')->getUserForApp($TS_USER[user][userid]);
	$newTopics = $db->fetch_all_assoc("select talkid,userid,title from ".dbprefix."talk_topics where isshow='0' order by addtime desc limit 6");
	
	foreach($newTopics as $key=>$item){
		$newTopic[] = $item;
		$newTopic[$key]['user'] = aac('user')->getSimpleUser($item['userid']);
	}
	include template('talk');
	$db->query("update ".dbprefix."talk_topics set `count_view`=count_view+1 where talkid='".$talkid."'");